package com.sjz.bookmark.tree;

import com.intellij.ide.bookmarks.Bookmark;
import com.intellij.openapi.fileEditor.FileEditorManager;
import com.intellij.openapi.fileEditor.OpenFileDescriptor;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.vfs.VirtualFile;

public class BookmarkNavigator {
    public static void navigateToBookmark(Project project, Bookmark bookmark) {
        VirtualFile file = bookmark.getFile();

        
        OpenFileDescriptor descriptor = new OpenFileDescriptor(
            project, file, 4, 0);
        FileEditorManager.getInstance(project).openTextEditor(descriptor, true);
    }
}